how to resolve input string was not in correct format